
convert.o:     file format elf64-littleaarch64


Disassembly of section .text:

0000000000000000 <f>:


int (*pf)(void);

int f(void)
{
   0:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
   4:	910003fd 	mov	x29, sp
	printf("================= wise\n");
   8:	90000000 	adrp	x0, 0 <f>
   c:	91000000 	add	x0, x0, #0x0
  10:	94000000 	bl	0 <puts>
	return 1;
  14:	52800020 	mov	w0, #0x1                   	// #1
}
  18:	a8c17bfd 	ldp	x29, x30, [sp], #16
  1c:	d65f03c0 	ret

0000000000000020 <test_pf>:

void test_pf()
{
  20:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  24:	910003fd 	mov	x29, sp
	pf = &f;
  28:	90000000 	adrp	x0, 8 <f+0x8>
  2c:	91000000 	add	x0, x0, #0x0
  30:	90000001 	adrp	x1, 0 <f>
  34:	91000021 	add	x1, x1, #0x0
  38:	f9000001 	str	x1, [x0]
	pf();
  3c:	90000000 	adrp	x0, 8 <f+0x8>
  40:	91000000 	add	x0, x0, #0x0
  44:	f9400000 	ldr	x0, [x0]
  48:	d63f0000 	blr	x0

	pf = f;
  4c:	90000000 	adrp	x0, 8 <f+0x8>
  50:	91000000 	add	x0, x0, #0x0
  54:	90000001 	adrp	x1, 0 <f>
  58:	91000021 	add	x1, x1, #0x0
  5c:	f9000001 	str	x1, [x0]
	pf();
  60:	90000000 	adrp	x0, 8 <f+0x8>
  64:	91000000 	add	x0, x0, #0x0
  68:	f9400000 	ldr	x0, [x0]
  6c:	d63f0000 	blr	x0

	pf = ****f;
  70:	90000000 	adrp	x0, 8 <f+0x8>
  74:	91000000 	add	x0, x0, #0x0
  78:	90000001 	adrp	x1, 0 <f>
  7c:	91000021 	add	x1, x1, #0x0
  80:	f9000001 	str	x1, [x0]
	pf();
  84:	90000000 	adrp	x0, 8 <f+0x8>
  88:	91000000 	add	x0, x0, #0x0
  8c:	f9400000 	ldr	x0, [x0]
  90:	d63f0000 	blr	x0

	(***************************************************f)();	// 任何函数都可以这样调用.
  94:	94000000 	bl	0 <f>
}
  98:	d503201f 	nop
  9c:	a8c17bfd 	ldp	x29, x30, [sp], #16
  a0:	d65f03c0 	ret

00000000000000a4 <re>:

int re()
{
  a4:	d10043ff 	sub	sp, sp, #0x10
	return ((int []){1,2,3,4})[3];	// 4.    ((int []){1,2,3,4})[2] = 3; []前面为数组,[]里为数组标号
  a8:	52800020 	mov	w0, #0x1                   	// #1
  ac:	b90003e0 	str	w0, [sp]
  b0:	52800040 	mov	w0, #0x2                   	// #2
  b4:	b90007e0 	str	w0, [sp, #4]
  b8:	52800060 	mov	w0, #0x3                   	// #3
  bc:	b9000be0 	str	w0, [sp, #8]
  c0:	52800080 	mov	w0, #0x4                   	// #4
  c4:	b9000fe0 	str	w0, [sp, #12]
  c8:	b9400fe0 	ldr	w0, [sp, #12]
}
  cc:	910043ff 	add	sp, sp, #0x10
  d0:	d65f03c0 	ret

00000000000000d4 <foo>:

unsigned long foo()
{
  d4:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  d8:	910003fd 	mov	x29, sp
	printf("\t=========== %ld\n", (unsigned long) - 1);	// -1
  dc:	90000000 	adrp	x0, 0 <f>
  e0:	91000000 	add	x0, x0, #0x0
  e4:	92800001 	mov	x1, #0xffffffffffffffff    	// #-1
  e8:	94000000 	bl	0 <printf>
	printf("\t--------11= %ld\n", (-1 / 8));	// 0
  ec:	90000000 	adrp	x0, 0 <f>
  f0:	91000000 	add	x0, x0, #0x0
  f4:	52800001 	mov	w1, #0x0                   	// #0
  f8:	94000000 	bl	0 <printf>

	printf("\t--------(-1)= %ld\n", ((unsigned int)(-1)));	// -1
  fc:	90000000 	adrp	x0, 0 <f>
 100:	91000000 	add	x0, x0, #0x0
 104:	12800001 	mov	w1, #0xffffffff            	// #-1
 108:	94000000 	bl	0 <printf>
	printf("\t--------(-1)= %ld\n", ((unsigned int)(-1))+1);	// 0
 10c:	90000000 	adrp	x0, 0 <f>
 110:	91000000 	add	x0, x0, #0x0
 114:	52800001 	mov	w1, #0x0                   	// #0
 118:	94000000 	bl	0 <printf>
	printf("\t--------( 0)= %ld\n", ((unsigned int)(0)));	// 0
 11c:	90000000 	adrp	x0, 0 <f>
 120:	91000000 	add	x0, x0, #0x0
 124:	52800001 	mov	w1, #0x0                   	// #0
 128:	94000000 	bl	0 <printf>
	return (unsigned long) - 1 / 8;			// 536870911	0x1FFFFFFF
 12c:	92fc0000 	mov	x0, #0x1fffffffffffffff    	// #2305843009213693951
}
 130:	a8c17bfd 	ldp	x29, x30, [sp], #16
 134:	d65f03c0 	ret

0000000000000138 <foo2>:

unsigned long foo2()
{
	return ((unsigned long) - 1) / 8;		// 536870911	0x1FFFFFFF
 138:	92fc0000 	mov	x0, #0x1fffffffffffffff    	// #2305843009213693951
}
 13c:	d65f03c0 	ret

0000000000000140 <foo3>:

unsigned long foo3()
{
	return (unsigned long) (-1 / 8);		// 0
 140:	d2800000 	mov	x0, #0x0                   	// #0
}
 144:	d65f03c0 	ret

0000000000000148 <fxxx>:


int xxx = 7;
int fxxx()
{
 148:	d10043ff 	sub	sp, sp, #0x10
	int xxx = 3;
 14c:	52800060 	mov	w0, #0x3                   	// #3
 150:	b9000fe0 	str	w0, [sp, #12]
	{
		extern int xxx;
		return xxx;	// 7
 154:	90000000 	adrp	x0, 0 <f>
 158:	91000000 	add	x0, x0, #0x0
 15c:	b9400000 	ldr	w0, [x0]
	}
}
 160:	910043ff 	add	sp, sp, #0x10
 164:	d65f03c0 	ret

0000000000000168 <iii>:

int iii()
{
	return ((1 - sizeof(int)) >> 31);	// 1
 168:	12800000 	mov	w0, #0xffffffff            	// #-1
}
 16c:	d65f03c0 	ret

0000000000000170 <point_to_long>:


void point_to_long(char *name)
{
 170:	d10083ff 	sub	sp, sp, #0x20
 174:	f90007e0 	str	x0, [sp, #8]
	unsigned long addr;

	addr = (unsigned long)name;
 178:	f94007e0 	ldr	x0, [sp, #8]
 17c:	f9000fe0 	str	x0, [sp, #24]
}
 180:	d503201f 	nop
 184:	910083ff 	add	sp, sp, #0x20
 188:	d65f03c0 	ret

000000000000018c <invoke>:


void invoke()
{
 18c:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
 190:	910003fd 	mov	x29, sp
	printf("invoke re   ======== %ld\n",  re());		// 4
 194:	94000000 	bl	a4 <re>
 198:	2a0003e1 	mov	w1, w0
 19c:	90000000 	adrp	x0, 0 <f>
 1a0:	91000000 	add	x0, x0, #0x0
 1a4:	94000000 	bl	0 <printf>
	printf("invoke foo  ======== %ld\n", foo());	// 536870911 
 1a8:	94000000 	bl	d4 <foo>
 1ac:	aa0003e1 	mov	x1, x0
 1b0:	90000000 	adrp	x0, 0 <f>
 1b4:	91000000 	add	x0, x0, #0x0
 1b8:	94000000 	bl	0 <printf>
	printf("invoke foo2 ======== %ld\n", foo2());	// 536870911 
 1bc:	94000000 	bl	138 <foo2>
 1c0:	aa0003e1 	mov	x1, x0
 1c4:	90000000 	adrp	x0, 0 <f>
 1c8:	91000000 	add	x0, x0, #0x0
 1cc:	94000000 	bl	0 <printf>
	printf("invoke foo3 ======== %ld\n", foo3());	// 0
 1d0:	94000000 	bl	140 <foo3>
 1d4:	aa0003e1 	mov	x1, x0
 1d8:	90000000 	adrp	x0, 0 <f>
 1dc:	91000000 	add	x0, x0, #0x0
 1e0:	94000000 	bl	0 <printf>
	printf("invoke iii    ======== %ld\n", iii());	// 1
 1e4:	94000000 	bl	168 <iii>
 1e8:	2a0003e1 	mov	w1, w0
 1ec:	90000000 	adrp	x0, 0 <f>
 1f0:	91000000 	add	x0, x0, #0x0
 1f4:	94000000 	bl	0 <printf>
	printf("invoke fxxx    ======== %ld\n", fxxx());	// 7
 1f8:	94000000 	bl	148 <fxxx>
 1fc:	2a0003e1 	mov	w1, w0
 200:	90000000 	adrp	x0, 0 <f>
 204:	91000000 	add	x0, x0, #0x0
 208:	94000000 	bl	0 <printf>
}
 20c:	d503201f 	nop
 210:	a8c17bfd 	ldp	x29, x30, [sp], #16
 214:	d65f03c0 	ret

0000000000000218 <main>:

int main()
{
 218:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
 21c:	910003fd 	mov	x29, sp

	test_pf();
 220:	94000000 	bl	20 <test_pf>
	(***************************test_pf)();	// 两种不同的调用方式.效果相同.
 224:	94000000 	bl	20 <test_pf>
	invoke();
 228:	94000000 	bl	18c <invoke>
	
	return 0;
 22c:	52800000 	mov	w0, #0x0                   	// #0
}
 230:	a8c17bfd 	ldp	x29, x30, [sp], #16
 234:	d65f03c0 	ret
